package com.yungu.swift.api.route.v1.common;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yungu.swift.base.ResponseData;
import com.yungu.swift.base.model.annotation.ResponseImgOverride;
import com.yungu.swift.order.model.vo.TripSharingInfoVo;
import com.yungu.swift.order.service.OrderTripSharingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:  行程分享接口
 *
 * @version: 1.0
 */
@RestController
@Api(value = "行程分享接口", tags = "行程分享接口")
public class TripSharingApi {

    @Reference
    private OrderTripSharingService orderTripSharingService;

    @ResponseImgOverride
    @RequestMapping(value = "/api/v1/common/tripSharing", method = RequestMethod.POST)
    @ApiOperation(value = "行程分享接口", response = ResponseData.class)
    public ResponseData<TripSharingInfoVo> tripSharing(
            @ApiParam(name = "orderUuid", value = "orderUuid", required = true) @RequestParam String orderUuid,
            @ApiParam(name = "appid", value = "appid", required = true) @RequestParam String appid
    ) {
        return orderTripSharingService.tripSharingInfo(orderUuid, appid);
    }
}
